          <div class="nav-collapse collapse">
          <div class="pull-right">
          <ul class="nav">
		  	<?php if (isset($_SESSION['session'])) {?>
                <li class="active"><a href="profile.php">Profile</a></li>
				<li><a href="hospitals.php">Hospitals</a> </li>
				<li><a href="calendar.php">Calendar</a></li>
				<li><a href="notifications.php">Notifications</a> </li>
				<li><a href="admin.php">Admin</a> </li>
				<li><a href="log.php">Log</a></li>
				<li><a href="request.php">Requests</a></li>
                <li><a href="edit.php">Settings</a></li>
                <?php
                if($user->getRole() === 'doctor'){
                    echo '<li><a href="patients.php">Patients</a> </li>';
                } else {
				    echo '<li><a href="doctors.php">Doctors</a></li>';
                }
                ?>
            </ul>
				<form action="function/logout_function.php" method="POST" style="display: inline;">
				<input type="submit" name="logout" class="btn btn-primary" value="Logout" />
				</form>
				<?php } else { ?>
				<?php 
					if (isset($_GET['error']) && intval($_GET['error']) === 1) {
						echo "Invalid username or password <br />";
					} else if (isset($_GET['error']) && intval($_GET['error']) === 2) {
						echo "You need to login to access that part of the site <br />";
					}
				?>

					<form action="function/login_function.php" method="POST" style="display:inline">
                    <input type="text" class="input-small" placeholder="Email" id="username" name="username" style="margin-top:8px;"/>
                    <input type="password" class="input-small" placeholder="Password" id="password" name="password" style="margin-top:8px;"/>
                    <button type="submit" class="btn btn-primary">Login</button>
					</form>
				<?php }  ?>


              </div>
              
          </div><!--/.nav-collapse -->